package com.aishua.andpaydemo.activity;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by aishua on 2018/5/15.
 */

public class BaseActivity extends AppCompatActivity {

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
        super.onCreate(savedInstanceState, persistentState);
    }


    private ProgressDialog progressDialog;

    public void showAlert(String title, String message) {

        new AlertDialog.Builder(this).
                setTitle(title).setMessage(message).
                setPositiveButton("确定", null).
                setCancelable(true).show();
    }

    public void showproDialog(String title) {

        progressDialog = ProgressDialog.show(this, "", title, true, false);
    }

    public void dismissproDialog() {

        progressDialog.dismiss();
    }
}

